﻿/**	thread_pool.h
 *	----	Create Time Stamp	--2005-10-30 10:33:16--
 *-----------------------------------------------------------------------------
 *	Mean	:常规线程池
 *	Author	:Nick Shallery	(nicknide@gmail.com)
 *	Version	:1.0.28.40		(2007-09-11 21:17:21)
 *-----------------------------------------------------------------------------
**/	/*YOU HAVE ALL LEFT WITH THIS CODE WHILE YOU KEEP COMMENT IN EVERY COPY.*/


#if			!defined(__LOLIX__LOLI__THREAD_POOL__K_IN_G__)
#define		__LOLIX__LOLI__THREAD_POOL__K_IN_G__
//==============================================================================
//--------------------------------------------------------------------------

#if			!defined(__cplusplus)
#	error      Must Have C++ Complier Support
#endif  //  __cplusplus

#if			!defined(__LOLIX__LOLI_X_CFG__K_IN_G__)
	#include	"../lolix_cfg.h"
#endif	//	!defined(__LOLIX__LOLI_X_CFG__K_IN_G__)

#if			!defined(__LOLIX__LOLIX_TYPE__K_IN_G__)
	#include	"../lolix_type.h"
#endif	//	!defined(__LOLIX__LOLIX_TYPE__K_IN_G__)

#if			!defined(__LOLIX__TOY__TIME_TYPES__K_IN_G__)
	#include	"../toy/time_types.h"
#endif	//	!defined(__LOLIX__TOY__TIME_TYPES__K_IN_G__)

#if			!defined(__LOLIX__TOY__REBIND_TYPE__K_IN_G__)
	#include	"../toy/rebind_type.hpp"
#endif	//	!defined(__LOLIX__TOY__REBIND_TYPE__K_IN_G__)

#if			!defined(__LOLIX__LOLI__THREAD__NICK__K_IN_G__)
	#include	"./thread.h"
#endif	//	!defined(__LOLIX__LOLI__THREAD__NICK__K_IN_G__)



namespace lolix{namespace loli{
class LOLIX_NO_VTABLE thread_pool
	: public itf
{
public:
	LOLIX_DEFINE_FACTORY((0x64f44f35, 0x382f4223, 0x966a12f5, 0x74ee1d65), (thread_pool** out_ptr));
	LOLIX_DEFINE_ITF_ID(0xa34be1e1, 0xc94c42ee, 0x8cde398f, 0x01bd693f);
	virtual	size_type	LOLIX_CALL	size(void)const						= 0;
	virtual	size_type	LOLIX_CALL	capacity(void)const					= 0;
	virtual	LOLIX_RETNV	LOLIX_CALL	reserve(size_type)					= 0;
	virtual	LOLIX_RETNV	LOLIX_CALL	insert(thread::query*)				= 0;
	virtual	LOLIX_RETNV	LOLIX_CALL	wait(const toy::time_span* t_wait)	= 0;
};

}}

SYS_REGIST_TYPE(lolix::loli::thread_pool);
SYS_REGIST_TYPE(lolix::loli::thread_pool::factory_type);

//--------------------------------------------------------------------------
//==============================================================================
#endif	//	!defined(__LOLIX__LOLI__THREAD_POOL__K_IN_G__)
